home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch24
/
24fig04.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
2KB
|
77 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Middle C (C4)
Transform {
children [
DEF WhiteKey Shape {
appearance Appearance {
material Material { }
}
geometry Box { size 0.23 0.1 1.5 }
},
DEF C4 TouchSensor { },
Sound {
source DEF PitchC4 AudioClip {
url "tone1.wav"
pitch 1.0
}
}
]
},
# C# above middle C (Cs4)
Transform { translation 0.125 0.1 -0.375
children [
DEF BlackKey Shape {
appearance Appearance {
material Material {
diffuseColor 0.4 0.4 0.4
}
}
geometry Box { size 0.2 0.1 0.75 }
},
DEF Cs4 TouchSensor { }
Sound {
source DEF PitchCs4 AudioClip {
url "tone1.wav"
pitch 1.059
}
}
]
},
# D above middle C (D4)
Transform { translation 0.25 0.0 0.0
children [
USE WhiteKey,
DEF D4 TouchSensor { }
Sound {
source DEF PitchD4 AudioClip {
url "tone1.wav"
pitch 1.122
}
}
]
},
# D# above middle C (Ds4)
Transform { translation 0.375 0.1 -0.375
children [
USE BlackKey,
DEF Ds4 TouchSensor { }
Sound {
source DEF PitchDs4 AudioClip {
url "tone1.wav"
pitch 1.189
}
}
]
}
]
}
ROUTE C4.touchTime TO PitchC4.set_startTime
ROUTE Cs4.touchTime TO PitchCs4.set_startTime
ROUTE D4.touchTime TO PitchD4.set_startTime
ROUTE Ds4.touchTime TO PitchDs4.set_startTime